//
//  History.m
//  nova
//
//  Created by user on 11/07/03.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "History.h"


@implementation History
@synthesize historysObject;

- (id) initWithHistorys : (Historys *) phistory{
	[self init];
	historysObject = phistory;
	return self;
}

- (id) initWithProject : (Project *) project{
	[self init];
	historysObject = [[Historys alloc] init];
	[historysObject setVTimestamp:[Library getCurrentTime]];
	[historysObject setVIdProjects:[project getProjectId]];
	return self;
}

- (id) initWithAction : (Action *) action{
	[self init];
	historysObject = [[Historys alloc] init];
	[historysObject setVTimestamp:[Library getCurrentTime]];
	[historysObject setVIdActions:[action getActionId]];
	return self;
}

- (id) initWithProblem : (Problem *) problem{
	[self init];
	historysObject = [[Historys alloc] init];
	[historysObject setVTimestamp:[Library getCurrentTime]];
	[historysObject setVIdProblems:[problem getProblemId]];
	return self;
}

- (id) initWithRisk : (Risk *) risk {
	[self init];
	historysObject = [[Historys alloc] init];
	[historysObject setVTimestamp:[Library getCurrentTime]];
	[historysObject setVIdRisks:[risk getID]];
	return self;
}

- (void) setHistorydescription : (NSString *) description{
	[historysObject setVDescription:description];
}
@end
